package Vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.ListModel;

import javax.swing.WindowConstants;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class Vevento extends javax.swing.JFrame {
	private JPanel panContedore;
	private JLabel lbltipo;
	private JTextField txtagasajado;
	private JTextField txtfecha_evento;
	private JButton btnregistrar;
	private JTable tblinvitados;
	private JComboBox cmbevento;
	private JButton btnsalir;
	private JTextField txtdireccion;
	private JLabel lbldireccion;
	private JTextField txthora;
	private JLabel lblhora;
	private JLabel lblfecha_evento;
	private JLabel lblagasajado;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				Vevento inst = new Vevento();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public Vevento() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				panContedore = new JPanel();
				getContentPane().add(panContedore, BorderLayout.CENTER);
				panContedore.setLayout(null);
				panContedore.setPreferredSize(new java.awt.Dimension(440, 512));
				{
					lbltipo = new JLabel();
					panContedore.add(lbltipo);
					lbltipo.setText("Tipo de Evento:");
					lbltipo.setBounds(80, 85, 104, 15);
				}
				{
					lblagasajado = new JLabel();
					panContedore.add(lblagasajado);
					lblagasajado.setText("Agasajado:");
					lblagasajado.setBounds(80, 122, 70, 15);
				}
				{
					txtagasajado = new JTextField();
					panContedore.add(txtagasajado);
					txtagasajado.setBounds(196, 119, 92, 22);
				}
				{
					lblfecha_evento = new JLabel();
					panContedore.add(lblfecha_evento);
					lblfecha_evento.setText("Fecha Evento:");
					lblfecha_evento.setBounds(80, 163, 89, 15);
				}
				{
					txtfecha_evento = new JTextField();
					panContedore.add(txtfecha_evento);
					txtfecha_evento.setBounds(196, 160, 92, 22);
				}
				{
					lblhora = new JLabel();
					panContedore.add(lblhora);
					lblhora.setText("Hora:");
					lblhora.setBounds(80, 199, 48, 15);
				}
				{
					txthora = new JTextField();
					panContedore.add(txthora);
					txthora.setBounds(197, 196, 91, 22);
				}
				{
					lbldireccion = new JLabel();
					panContedore.add(lbldireccion);
					lbldireccion.setText("Dirección:");
					lbldireccion.setBounds(80, 231, 62, 15);
				}
				{
					txtdireccion = new JTextField();
					panContedore.add(txtdireccion);
					txtdireccion.setBounds(197, 228, 91, 22);
				}
				{
					TableModel tblinvitadosModel = 
							new DefaultTableModel(
									new String[][] { { "One", "Two" }, { "Three", "Four" } },
									new String[] { "Column 1", "Column 2" });
					tblinvitados = new JTable();
					panContedore.add(tblinvitados);
					tblinvitados.setModel(tblinvitadosModel);
					tblinvitados.setBounds(80, 284, 279, 74);
				}
				{
					btnregistrar = new JButton();
					panContedore.add(btnregistrar);
					btnregistrar.setText("Registrar");
					btnregistrar.setBounds(80, 402, 71, 22);
				}
				{
					btnsalir = new JButton();
					panContedore.add(btnsalir);
					btnsalir.setText("Salir");
					btnsalir.setBounds(197, 402, 67, 22);
				}
				{
					ComboBoxModel cmbeventoModel = 
							new DefaultComboBoxModel(
									new String[] { "Item One", "Item Two" });
					cmbevento = new JComboBox();
					panContedore.add(cmbevento);
					cmbevento.setModel(cmbeventoModel);
					cmbevento.setBounds(196, 72, 92, 22);
				}
			}
			pack();
			this.setSize(438, 559);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	public void agregarListener(ActionListener actionListener) {
		btnregistrar.addActionListener(actionListener);
		btnsalir.addActionListener(actionListener);
		
	}
	
}





